﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository.Mapping
{
    class RatingHistoryMap : ClassMap<RatingHistory>
    {

        public RatingHistoryMap()
        {

            Table("RATING_HISTORY");
            Id(x => x.RatingHistoryId, "RATING_HISTORY_ID").GeneratedBy.Native();

            Map(x => x.FinancialInstrumentId, "FINANCIAL_INSTRUMENT_ID");
            Map(x => x.FinancialInstrumentType, "FINANCIAL_INSTRUMENT_TYPE");
            Map(x => x.FinancialInstrumentTypeID, "FINANCIAL_INSTRUMENT_TYPE_ID");
            Map(x => x.IssueRating, "ISSUE_RATING");
            Map(x => x.IssueCreditAgency, "ISSUE_CREDIT_AGENCY");
            Map(x => x.IssueUpdateDate, "ISSUE_UPDATE_DATE");
            Map(x => x.IssueCreditAgencyCountry, "ISSUE_CREDIT_AGENCY_COUNTRY");
            Map(x => x.IssuerRating, "ISSUER_RATING");
            Map(x => x.IssuerCreditAgency, "ISSUER_CREDIT_AGENCY");
            Map(x => x.IssuerUpdateDate, "ISSUER_UPDATE_DATE");
            Map(x => x.IssuerCreditAgencyCountry, "ISSUER_CREDIT_AGENCY_COUNTRY");
            Map(x => x.GuarantorRating, "GUARANTOR_RATING");
            Map(x => x.GuarantorCreditAgency, "GUARANTOR_CREDIT_AGENCY");
            Map(x => x.GuarantorUpdateDate, "GUARANTOR_UPDATE_DATE");
            Map(x => x.GuarantorCreditAgencyCountry, "GUARANTOR_CREDIT_AGENCY_COUNTRY");
            Map(x => x.CreateUserId, "CREATE_USER_ID");
            Map(x => x.CreateTs, "CREATE_TS");
            
        }


    }

}
